<?php
namespace app\index\controller;

class Message extends CheckMember
{
    /**
     * 消息中心
     * @return \think\response\View
     */
    public function index()
    {
        // 获取融云信息
        $param['member_id'] = session('member_id');
        $data = $this->local_invoke_api('get_member_rong_info', $param);
        $this->assign('data', $data['data']);

        // 获取历史记录
        $data = $this->local_invoke_api('get_rong_msg_list', $param);
        $this->assign('list', $data['data']);

        return view();
    }


    // 根据
    public function get_rong_member_info() {
        // 获取融云信息
        $param['userId'] = input('param.userId');
        $data = $this->local_invoke_api('get_member_rong_info_by_userId', $param);
        return json($data);
    }
}
